package top.infopub.mgr.qrtz.service.impl;


import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import top.infopub.generic.GenericDao;
import top.infopub.generic.GenericServiceImpl;
import top.infopub.mgr.qrtz.dao.JobConsoleDao;
import top.infopub.mgr.qrtz.service.JobConsoleService;
import top.infopub.mgr.qrtz.vo.JobTriggersVo;
import top.infopub.model.qrtz.JobTriggers;

import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;


@Service
public class JobConsoleServiceImpl extends GenericServiceImpl<JobTriggers, String> implements JobConsoleService {

    @Autowired
    private JobConsoleDao jobConsoleDao;

    @Override
    public GenericDao<JobTriggers, String> getDao() {
        return jobConsoleDao;
    }

    @Override
    public Page<JobTriggers> selectDataByCondition(Page<JobTriggers> page, JobTriggersVo vo) {
        PageHelper.startPage(page.getPageNum(), page.getPageSize());
        return (Page<JobTriggers>)jobConsoleDao.selectJobByCondition(vo);
    }

}